ACTIVITY ON OSCILLATIONS

A body is performing a simple harmonic oscillation x(t) = A sin(w t), with width A = 10 cm and frequency w = π/2.
a) Calculate the position of the body 1, 2 and 3 sec from the starting time point the oscillation (the starting position regarded as 0).
b) Create the table of positions for the time points t = 0, 1/3, 2/3, 1, 4/3, 5/3,2, 7/3, 8/3, 3, 10/3, 11/3,4sec
c) Plot the graph of the position of the body in the time interval [0, T sec] where T = the smallest period.    

Note: In order to define any function or run any program or command in Mathematica, press SHIFT + ENTER or ENTER in the Num Pad.

x[t_] := A * Sin[w * t]

A = 10

w = Pi/2

10

π/2

a) In order to calculate the body's position for t = 1 sec, t = 2 sec and t = 3 sec we are calculating the values of the function x(t) for t = 1, t = 2 and t = 3.

x[1]

10

x[2]

0

x[3]

-10

b) In order to create the table of positions for the time points t =0, 1/3, 2/3, 1, 4/3, 5/3,2, 7/3, 8/3, 3, 10/3, 11/3,4 sec we are using the command Table[ {t, x [t] }, {t, 0, 4, 1/3} ]

TableForm[Table[{t, x[t]}, {t, 0, 4, 1/3}], TableHeadings→ {None, {"t", "x(t)"}}, TableAlignments→Center, TableDirections→Row]

t 0 1/3 2/3 1 4/3 5/3 2 7/3 8/3 3 10/3 11/3 4
x(t) 0 5 5 3^(1/2) 10 5 3^(1/2) 5 0 -5 -5 3^(1/2) -10 -5 3^(1/2) -5 0

c) In order to plot the graph of positions for the time interval [0, T sec], firsty we are calculating T = (2π)/w

T = 2 * Pi/w

4

c1) EITHER we are ploting the points (t, x(t) ) for t =0, 1/3, 2/3, 1, 4/3, 5/3,2, 7/3, 8/3, 3, 10/3, 11/3,4 sec  from the former table using the command ListPlot[Table[ {t, x [t] }, {t, 0, 4, 1/3} ] ]

[Graphics:../HTMLFiles/Physics, Oscillations_54.gif]

-Graphics -

Taking more points ListPlot[Table[ {t, x [t] }, {t, 0, 4, 0.1} ] ]   or ListPlot[Table[ {t, x [t] }, {t, 0, 4, 0.01} ] ]

[Graphics:../HTMLFiles/Physics, Oscillations_57.gif]

-Graphics -

[Graphics:../HTMLFiles/Physics, Oscillations_60.gif]

-Graphics -

c2) OR we are ploting the graph of the function x(t) for t ∈[0, 4] with the command Plot[x [t], {t, 0, 4} ] ]

[Graphics:../HTMLFiles/Physics, Oscillations_63.gif]

-Graphics -

EXERCISE:
Using the commands and programs presented above, study the following oscillation:
A body is performing a simple harmonic oscillation, with width A = 5 cm and frequency w = π/4.
a) Calculate the position of the body 1, 3 and 7 sec from the starting time point the oscillation (the starting position regarded as 0).
b) Create the table of positions for the time points t = 0, T/4, T/2, (3T)/4, T, (5T)/4, (3T)/2, (7T)/4, 2T sec, where T = the smallest period.    
c) Plot the graph of the position of the body in the time interval [0, 2T sec] .


Created by Mathematica  (November 4, 2015) Valid XHTML 1.1!